Exchange API icon

Exchange API

(3 reviews)

Version Agnostic Properties

Version agnostic properties apply to all versions of the asset. These properties are the asset’s icon, name, description, contact_name, contact_email and asset status.

The following examples show how to update these properties.

Before executing the examples, obtain a token with the instructions in the Anypoint Platform Token section. In each example, replace ANYPOINT_TOKEN with your token.

In all examples, replace :groupId with the group ID of the asset to update, and replace :assetId with the asset ID of the asset to update.

You can send HTTP commands with cURL, Postman, or another application. These examples use cURL.

Update an asset name

Replace New name with the new name for the asset.

curl 'https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId' \
  -X 'PATCH' \
  -H 'accept: application/json' \
  -H 'authorization: bearer ANYPOINT_TOKEN' \
  -H 'content-type: application/json' \
  -d '{"name":"New name"}'

Update an asset description

Replace New description with the new description for the asset.

curl 'https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId' \
  -X 'PATCH' \
  -H 'accept: application/json' \
  -H 'authorization: bearer ANYPOINT_TOKEN' \
  -H 'content-type: application/json' \
  -d '{"description":"New description"}'

Update an asset icon

Replace /file-path/image.png with the path of the image file, and replace image/png with the correct content type of the image file.

curl 'https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId/icon' \
  -X 'PUT' \
  -H 'accept: application/json' \
  -H 'authorization: bearer ANYPOINT_TOKEN' \
  -H 'content-type: image/png' \
  -T /file-path/image.png

Update an asset contact name

Replace New name with the new contact name for the asset.

curl 'https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId' \
  -X 'PATCH' \
  -H 'accept: application/json' \
  -H 'authorization: bearer ANYPOINT_TOKEN' \
  -H 'content-type: application/json' \
  -d '{"contactName":"New name"}'

Update an asset contact email

Replace new@email.com with the new contact email for the asset.

curl 'https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId' \
  -X 'PATCH' \
  -H 'accept: application/json' \
  -H 'authorization: bearer ANYPOINT_TOKEN' \
  -H 'content-type: application/json' \
  -d '{"contactEmail":"new@email.com"}'

Last updated date

An asset's last updated date timestamp is saved when you:

  • Create a new asset
  • Create a new asset version
  • Update any version agnostic property:
    • Name
    • Description
    • Icon
    • Contact name
    • Contact email
  • Update the asset status

The updatedDate timestamp applies to all versions of the asset and is identified by the asset :groupId and asset :assetId.

When the last updated date feature was added, the last updated date of each existent, not_deleted, and completed asset was set to the most recent creation date of that asset's versions.


Reviews

DU
Deleted UserApr 4, 2023, 10:15 PM
Relative URLs to other pages
How can we add relative URLs on the Home page that go to other pages of the API specifications that work on both Exchange and Developer Portal? For example, I'd like to add a link to the Summary page. I tried to use ../../console/summary, but it would fail if I click on this without clicking on Home first. In Dev Portal: first time clicking on asset arrives at: https://anypoint.mulesoft.com/exchange/portals/:organizationId/:groupId/:assetId/ clicking on Home: https://anypoint.mulesoft.com/exchange/portals/:organizationId/:groupId/:assetId/minor/1.0/pages/home/ Summary page: https://anypoint.mulesoft.com/exchange/portals/:organizationId/:groupId/:assetId/minor/1.0/console/summary/ similarly in Exchange https://anypoint.mulesoft.com/exchange/:groupId/:assetId/minor/1.0/ https://anypoint.mulesoft.com/exchange/:groupId/:assetId/minor/1.0/pages/home/ https://anypoint.mulesoft.com/exchange/:groupId/:assetId/minor/1.0/console/summary/
DU
Deleted UserAug 15, 2022, 3:41 PM
Categories API Documentation
https://anypoint.mulesoft.com/exchange/api/v2/organizations/{organizationId}/categories example provided in documentation is not correct, it returns 400 bad request with following. { "status": 400, "message": "Must provide acceptedValues for an enum dataType", "details": {} } the correct example could be { "displayName": "Medical Discipline", "acceptedValues": [ "Salesforce" ], "assetTypeRestrictions": ["custom"] }
DU
Deleted UserOct 25, 2021, 12:32 PM
Useful API Documentation
THanks for documenting this , really useful!